package com.zuoye;

import java.util.Scanner;

public class Demo1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入第一个整数：");
        int num1 = input.nextInt();
        System.out.print("请输入第二个整数：");
        int num2 = input.nextInt();
        System.out.println("请输入您要进行的运算");
        System.out.print("(1:表示加法,2:表示减法,3:表示乘法,4:表示除法):");
        int ys = input.nextInt();

        switch (ys) {
            case 1:
                System.out.println(num1 + "+" + num2 + "=" + (num1 + num2));
                break;
            case 2:
                System.out.println(num1 + "-" + num2 + "=" + (num1 - num2));
                break;
            case 3:
                System.out.println(num1 + "*" + num2 + "=" + (num1 * num2));
                break;
            case 4:
                System.out.println(num1 + "/" + num2 + "=" + (num1 / num2));
                break;
            default:
                System.out.println("输入错误");
                break;

        }

    }
}
